from time import sleep

from TollAll import tool
from net_project_xb.xbWorkPage import xbWorkPage
from page.net_project_tools.net_work_page import NetWorkPage
import user_data
import unittest
import warnings


class xbWorkTest(unittest.TestCase,tool):

    def setUp(self):
        warnings.simplefilter('ignore', ResourceWarning)

    def tearDown(self):
        self.page.logout()

    def test_net_work_release(self):
        """发布作业"""
        self.test_send_work_release()

        # self.page = xbWorkPage()
        # self.page.login(*user_data.xb_project_admin)
        # sleep(2)
        # self.page.enter_project()
        # self.page.enter_tools('作业')
        # self.page.release_work()

    def test_net_work_submit(self):
        """提交作业"""
        self.test_submit_work_submit()

        # self.page = xbWorkPage()
        # self.page.login(*user_data.xb_student)
        # sleep(2)
        # self.page.enter_project()
        # self.page.enter_tools('作业')
        # self.page.submit_work()

    def test_net_work_view(self):
        """批阅作业"""
        self.test_Piyue_work_view()

        # self.page = xbWorkPage()
        # self.page.login(*user_data.xb_project_admin)
        # sleep(2)
        # self.page.enter_project()
        # self.page.enter_tools('作业')
        # self.page.view_work()


if __name__ == '__main__':
    unittest.main()
